package com.shopping.common.core.util;

/**
 * @author: zlw
 * @date: 2024/9/12
 */

import com.github.pagehelper.Page;
import com.shopping.common.sp.vo.user.UserVo;

import java.util.HashMap;
import java.util.List;

/**
 * 生成带有分页信息的数据列表
 */
public class MyPageUtil {
    public static HashMap<String, Object> makePageResponse(Page<UserVo> resultPage) {
        HashMap<String, Object> pageMap = new HashMap<>();
        pageMap.put("dataList",resultPage.getResult());
        pageMap.put("total",resultPage.getTotal());
        return pageMap;
    }
}
